# $Id: PKGBUILD 87439 2013-03-31 19:18:57Z stephane $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>

pkgname=spring
pkgver=0.94.1
_pkgver=94.1
pkgrel=2
pkgdesc='A free 3D real-time-strategy (RTS) game engine'
arch=('i686' 'x86_64')
url="http://springrts.com/"
license=('GPL')
depends=('openal' 'glew' 'boost-libs' 'freetype2' 'devil' 'libvorbis' 'sdl'
         'libxcursor' 'curl' 'shared-mime-info' 'desktop-file-utils')
makedepends=('boost' 'cmake' 'zip' 'xz' 'p7zip' 'python2' 'java-environment' 'mesa')
optdepends=('python2: python-based bots'
            'java-runtime: java-based bots')
install=spring.install
source=(http://downloads.sourceforge.net/sourceforge/springrts/${pkgname}_${_pkgver}_src.tar.lzma)
md5sums=('bafc1e889bed31666553efc387a13b49')

build() {
  bsdtar -xf ${pkgname}_${_pkgver}_src.tar.lzma
  
  cd spring_${_pkgver}

  cmake	. \
    -DCMAKE_INSTALL_PREFIX=/usr \
	-DDATADIR=share/spring \
    -DCMAKE_SKIP_RPATH=YES
  make
}

package() {
  cd spring_${_pkgver}

  make DESTDIR="$pkgdir" install

  install -d "$pkgdir/etc/spring"
  echo '$HOME/.spring' > "$pkgdir/etc/spring/datadir"
}

# vim sw=2:ts=2 et:
